package com.tec.cloud.notice.service;

import com.tec.cloud.notice.vo.ConfigVO;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ConfigService {

    CacheService cacheService;

    public ConfigService(CacheService cacheService) {
        this.cacheService = cacheService;
    }

    public void addConfig(ConfigVO config) {

    }

    public List<ConfigVO> list(String type) {
        ConfigVO configVO = ConfigVO.builder().key("https://merchant.zht16.com").build();
        List<ConfigVO> list = new ArrayList<>();
        list.add(configVO);
        configVO = ConfigVO.builder().key("https://www.tecchen.tech").build();
        list.add(configVO);
        return list;
//        return cacheService.list(type);
    }

    public ConfigVO getByKey(String key) {
        return null;
    }
}
